<template>
  <div class="home">
    <user-item></user-item>

    <asideRouteStudent current-page="1" v-show="defineStu()"></asideRouteStudent>
    <asideRouteTeacher current-page="1" v-show="defineTea()"></asideRouteTeacher>

    <div id="fish">
      <el-empty image="https://img.zcool.cn/community/01ea4b5c091dbea80120925222b559.gif" description="欢迎进入学生选课管理系统:P" style="color: khaki"></el-empty>
    </div>
      </div>

</template>

<script>
// @ is an alias to /src
import userItem from "../components/userItem";
import asideRouteStudent from "../components/asideRouteStudent";
import asideRouteTeacher from "../components/asideRouteTeacher";

export default {
  name: 'Home',
  components: {
    asideRouteStudent,
    asideRouteTeacher,
    userItem,
  },
  data() {
    let  set=JSON.parse(sessionStorage.getItem("user"))
    return {
      form: {
        id:set.id,
        name: set.name,
        phone:set.phone,
        sex:set.sex,
        password:set.password,
        email:set.email,
        identity:set.identity,
      },
      activeIndex: '1',
      activeIndex2: '1',
    };
  },
  methods: {
    defineStu(){
      return this.form.identity==="学生";
    },
    defineTea(){
      return this.form.identity==="教师";
    }
  }
}
</script>
<style>

 .el-menu-vertical-demo{
   float: left;
   position: sticky;
   width: 203px;
   left: -9px;
   text-align-all: center;
 }
#fish{
  position: absolute;
  left: 43%;
}

</style>
